import 'package:pacsun/view/task/widgets/cache_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ProfileAvatar extends StatelessWidget {
  final String proFileUrl;
  final double width;
  final double height;
  const ProfileAvatar(
      {super.key, required this.proFileUrl, this.width = 54, this.height = 54});
  @override
  Widget build(BuildContext context) {
    return Container(
      height: width.w,
      width: height.h,
      clipBehavior: Clip.hardEdge,
      decoration: BoxDecoration(
        // border: Border.all(width: 3.r, color: Colors.white),
        shape: BoxShape.circle,
        color: Colors.grey[700], // Background color for default avatar
      ),
      child: CacheNetworkImage(
        imageUrl: proFileUrl,
        fit: BoxFit.cover,
        imageType: ImageType.asset,
        width: 54,
        height: 54,
        borderRadius: 27,
      ),
    );
  }
}
